#include "../src/event_bus.hpp"
#include <iostream>
#include <chrono>
int main(){
    auto& b = EventBus::instance();
    Event e1{1, "hello",6};
    b.push(e1);
    while (true) {
        static int id = 3;
        Event e3{ id, "hello",6 };
        b.push(e3);
		id++;   
        if(b.pop(e3)){
            std::cout << "pop id: "<<e3.id<<",payload:" << e3.payload << std::endl;
		}   
        std::this_thread::sleep_for(std::chrono::seconds(1));
    }
}